package _7_Behaviour._6_chain;

/**
 * 自己注册自己，迭代处理
 */
public abstract class Handler
{
    /**
     * @link aggregation 
     * @supplierCardinality 0..1
     */
    protected Handler successor;

    public abstract void handleRequest();

    public void setSuccessor(Handler successor)
    {
        this.successor = successor;
    }

    public Handler getSuccessor()
    {
        return successor;
    }
}
